== README for replication archive of ==
== Tu, Jeffrey and Seth J. Hill. "Bureaucracy, Happiness, and Satisfaction at Work." PLOS One. ==


***** To run replication:
 1. Use R and execute Fig1-GSS.R to produce Figure 1.
      Figure_1.pdf
      
 2. Use R and execute CleanAndSubsetData.R to produce Table S2 as well as
      cleaned data sets for subsequent analysis.
      Outputs: Table S2.tex, all_reviews_cleaned.csv, reviews_by_date.csv

 3. Use R and execute Figs234.R to produce Figures 2, 3, and 4.
      Outputs: Figure_2.pdf, Figure_3a.pdf, Figure_3b.pdf, Figure_3c.pdf, Figure_3d.pdf, Figure_3e.pdf, Figure_3f.pdf, Figure_4.pdf 

 4. Use Stata and execute Tables12S3.do to produce Tables 1, 2, and S3.
      Outputs: Table_1.tex, Table_2.tex, Table_S3.tex

 5. Use R and execute Table_S1.R to produce Table S1.
      Outputs: Table_S1.html



***** Files for Data Creation
* These data files are used to create the intermediate datasets.
1. "GSSData.csv": General Social Survey from the gssr R package; csv distributed with replication archive written by authors. MIT + file LICENSE.
2. "all_reviews.csv": Glassdoor review data scraped by David Gauthier. License: CC BY_NC_SA 4.0. Source: https://scholar.google.com/citations?view_op=view_citation&hl=en&user=FQstpaoAAAAJ&citation_for_view=FQstpaoAAAAJ:UebtZRa9Y70C
  2a. "cleanedData.csv": Subset of all_reviews.csv use for Table S1.

***********************************
***** Software Dependencies *******
***********************************

Analyses were run in R version 4.5.1 and Stata version 16.1.

* R package dependences:
stargazer_5.2.3 stringr_1.5.1 tidytext_0.4.3 data.table_1.17.0 ggplot2_3.5.2 dplyr_1.1.4 gssr_0.8 bit64_4.6.0-1 bit_4.5.0.1 RColorBrewer_1.1-3

